<?php
/**
 * 新医嘱提醒接口
 * Created by PhpStorm.
 * User: zhang-hong
 * Date: 2017/3/6
 * Time: 17:46
 */
class newyizhuController extends Yaf_Controller_Abstract
{
    function IndexAction()
    {
        //初始化
        //G('begin');
        $request = $this->getRequest();
        $user_number = $request->getPost("user_number","");
        $user_department = $request->getPost("user_department","");
        $shebei_id = $request->getPost("shebei_id","");
        $user_department_id = $request->getPost("user_department_id","");
        if(empty($user_number))
        {
            Utility::apiJsonError(30011, '患者账号不能为空');
        }
        if(empty($user_department))
        {
            Utility::apiJsonError(30013, '科室不能为空');
        }

        if(empty($shebei_id))
        {
            Utility::apiJsonError(30012, '设备号不能为空');
        }

        if(empty($user_department_id))
        {
            Utility::apiJsonError(30014, '设备号不能为空');
        }
        $mod_yiuan_user = new YiyuanUserModel;
        $mod_yiuan_user->sendNewYizhu($user_number,$user_department);
        $data["msg"] = "";
        $data["error"] = 200;
        Utility::apiJsonResultExtends($data);
    }
}